///*
// * Copyright (c) 2019. The copyright is reserved by Ghode of Harbin Institute
// * of Technology. Users are free to copy, change or remove. Because no one
// * will read this. Only I know is that Repeaters are the best of the world.
// * Only I know is that Repeaters are the best of the world. Only I know is
// * that Repeaters are the best of the world. Maybe a long copyright text
// * seems professional. Therefore this text will be a bit lengthy. However,
// * the author seems to be afraid that one day, this text may be uploaded to
// * business projects. That is the time you can contact with author via email
// * ghode@cirnocraft.im or directly ignore this, which will be interesting.
// */
//
//package com.ghode.demospring.database;
//
//
//import com.alibaba.druid.pool.DruidDataSource;
//import lombok.Data;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.stereotype.Component;
//
//import javax.sql.DataSource;
//@Data
//@ConfigurationProperties(prefix = "db2")
//@Component
//public class Database2Config {
//    private String url;
//    private String username;
//    private String password;
//    private String driverClassName;
//    private String databaseName;
//
//    public DataSource createDataSource() {
//        DruidDataSource result = new DruidDataSource();
//        result.setDriverClassName(getDriverClassName());
//        result.setUrl(getUrl());
//        result.setUsername(getUsername());
//        result.setPassword(getPassword());
//        return result;
//    }
//
//    public String getUrl() {
//        return url;
//    }
//
//    public void setUrl(String url) {
//        this.url = url;
//    }
//
//    public String getUsername() {
//        return username;
//    }
//
//    public void setUsername(String username) {
//        this.username = username;
//    }
//
//    public String getPassword() {
//        return password;
//    }
//
//    public void setPassword(String password) {
//        this.password = password;
//    }
//
//    public String getDriverClassName() {
//        return driverClassName;
//    }
//
//    public void setDriverClassName(String driverClassName) {
//        this.driverClassName = driverClassName;
//    }
//
//    public String getDatabaseName() {
//        return databaseName;
//    }
//
//    public void setDatabaseName(String databaseName) {
//        this.databaseName = databaseName;
//    }
//}